package com.app.serve.enums;

/**
 * 异常枚举
 */
public enum ErrorCodeEnum {

    NEED_USERNAME(10001, "用户名不能为空"),
    NEED_PASSWORD(10002, "密码不能为空"),
    USERNAME_TOO_SHORT(10003, "用户名填写有误"),
    PASSWORD_TOO_SHORT(10004, "密码填写有误"),
    USERNAME_EXISTED(10005, "此用户已注册"),
    INSERT_FAILED(10006, "注册失败请重试"),
    SYSTEM_ERROR(20000, "系统异常");

     Integer code;

     String msg;

    ErrorCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
